package cn.cs.controller;

import cn.cs.common.Dto;
import cn.cs.common.DtoUtil;
import cn.cs.service.SettlementDetailedService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;


@RestController
@RequestMapping(value = "/sSettlementDetailed")
public class SettlementDetailedController {

    @Resource
    private SettlementDetailedService settlementDetailedService;


    /**
     * 分页查询 经销商维修服务单 抽成收益历史查看
     * @param pageNumber
     * @param pageSize
     * @param name
     * @param phone
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/csPlatform/getSettlementByPage")
    public Dto getSettlementByPage(Integer pageNumber, Integer pageSize, String name, String person, String phone) throws Exception {
        Map<String, Object> param = new HashMap<>();
        param.put("setState", "1");
        param.put("name", name);
        param.put("person", person);
        param.put("phone", phone);
        return DtoUtil.returnSuccess("获取成功", settlementDetailedService.querySettlementDetailedPageByMap(param, pageNumber, pageSize));
    }


}
